import React, { useState } from "react";
<<<<<<< HEAD
import StoPopup from "../components/StoPopup/StoPopup";

export default function PopupDemo() {
  const [showPop, setShowPop] = useState(false);
  const closePopup = () => setShowPop(false);
=======
import StoPopup from "../components/StoPopup";

export default function PopupDemo() {
  const [showPopup, setShowPopup] = useState(false);
>>>>>>> dev-rollup

  return (
    <div>
      <h3>PopupDemo</h3>
<<<<<<< HEAD
      <button onClick={() => setShowPop(true)}>显示弹窗</button>

      {showPop && (
        <StoPopup
          title="石头弹窗标题"
          onConfirm={() => console.log("用户点击了确定")}
          closePopup={closePopup}
        >
          <p>石头弹窗内容</p>
          <p>石头弹窗内容</p>
        </StoPopup>
      )}
=======
      <button onClick={() => setShowPopup(true)}>显示弹窗</button>

      {showPopup && (
        <StoPopup
          closer={setShowPopup}
          title="我的弹窗"
          onConfirm={() => console.log("已确定")}
        >
          <p>This is a modal content</p>
        </StoPopup>
      )}
      
>>>>>>> dev-rollup
    </div>
  );
}
